/**
 * 会员中心
 */
var app = getApp()
Page({
	data: {
		root:app.setting.att_url,
		pagedata:[],
		bannerHeight: Math.ceil(290.0 / 750.0 * getApp().screenWidth)
	},
	onPullDownRefresh: function (){
		var the=this;
		var opt={};
		the.onLoad(opt);
		setTimeout(function(){
			wx.stopPullDownRefresh()
		},1000);
	},
	onLoad: function (options){
		var the = this;
		wx.setNavigationBarTitle({
			  title: '我的优惠券'
		}),
		app.util.get('jy_weishop/coupon.myindex/',function(pagedata){
			//console.log(pagedata);
			the.setData({
				pagedata:pagedata,
				loading:false
			});
		});
	},
	click:function(evt){
		//用户点击事件 data.func 为方法名，data.params 为调用参数！
		var data=evt.currentTarget.dataset;
		//console.log(evt);
		app.util[data.func](data.params);
	}
})